package com.csproj.siiat.base.common.util;

import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;

public class LogUtils {

	public static String getMessage(Exception e) {
		String message = "";
		StringWriter sw = null;
		PrintWriter pw = null;
		try {
			sw = new StringWriter();
			pw = new PrintWriter(sw);
			e.printStackTrace(pw);
			message = sw.toString();
		} catch (Exception exception) {

		} finally {
			if (pw != null) {
				pw.flush();
				pw.close();
			}
			if (sw != null) {
				sw.flush();
				try {
					sw.close();
				} catch (IOException ioException) {
				}
			}
		}
		return message;

	}

}
